package org.example.controller;

import org.example.annotation.ResultAsJson;
import org.example.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @description:
 * @author: cxu
 * @date: 2021/9/10 11:48
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/result")
    @ResultAsJson("用户信息")
    @ResponseBody
    public User getUser(){
        return new User("李四",23,"男");
    }
}
